import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;


public class IOmain {

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		BufferedReader brf = new BufferedReader(new InputStreamReader(new FileInputStream("src/test")));
		BufferedReader brf1 = new BufferedReader(new InputStreamReader(new FileInputStream("src/test1")));
		BufferedWriter bfw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("src/test2")));

		//echo(br, bw);
		//printOutFile(brf, bw);
		//copy(brf, bfw);
		scramble(brf, brf1, bfw);

	}

	public static void echo(BufferedReader readit, BufferedWriter writer) throws IOException{
		String lin = readit.readLine();
		while(lin != null){
			writer.write(lin+"\n");
			writer.flush();
			lin = readit.readLine();
		}
		writer.close();
	}

	
	// INCOMPLETE
	
	public static void printOutFile(BufferedReader buff, BufferedWriter buffw) throws IOException{
		String lin = buff.readLine();
		while(lin != null){
			buffw.write(lin+"\n");
			buffw.flush();
			lin = buff.readLine();
		}
		buffw.close();
	}
	
	public static void copy(BufferedReader buff, BufferedWriter buffw) throws IOException{
		String lin = buff.readLine();
		while(lin != null){
			buffw.write(lin+"\n");
			buffw.flush();
			lin = buff.readLine();
		}
		buffw.close();
	}
	
	public static void scramble(BufferedReader buff, BufferedReader buffr, BufferedWriter buffw) throws IOException{
		String lin = buff.readLine();
		String lin1 = buffr.readLine();
		while(lin != null && lin1 != null){
			buffw.write(lin+"\n");
			buffw.write(lin1+"\n");
			buffw.flush();
			lin = buff.readLine();
			lin1 = buffr.readLine();
		}
		buffw.close();
	}

}
